<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>T3D: T3D::Quaternion Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">T3D
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>T3D</b></li><li class="navelem"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_t3_d_1_1_quaternion-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">T3D::Quaternion Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A quaternion class adapted from <a href="http://willperone.net/Code/Quaternion.php">http://willperone.net/Code/Quaternion.php</a>.  
 <a href="class_t3_d_1_1_quaternion.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_quaternion_8h_source.html">Quaternion.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a019944a146d7d35841d6a567abed5f49"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a019944a146d7d35841d6a567abed5f49">Quaternion</a> ()</td></tr>
<tr class="separator:a019944a146d7d35841d6a567abed5f49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5abd09be466be4b0ac66e6d1eb953bb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#ad5abd09be466be4b0ac66e6d1eb953bb">Quaternion</a> (float real, float x, float y, float z)</td></tr>
<tr class="separator:ad5abd09be466be4b0ac66e6d1eb953bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7286f9b4e59fee5c8020958b4e0e3035"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a7286f9b4e59fee5c8020958b4e0e3035">Quaternion</a> (float real, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;i)</td></tr>
<tr class="separator:a7286f9b4e59fee5c8020958b4e0e3035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a137438607cb89c9d9bace3bbf81047f6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a137438607cb89c9d9bace3bbf81047f6">Quaternion</a> (float theta_x, float theta_y, float theta_z)</td></tr>
<tr class="separator:a137438607cb89c9d9bace3bbf81047f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91789d9f59d876e82b24c92605a56bdb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a91789d9f59d876e82b24c92605a56bdb">Quaternion</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;angles)</td></tr>
<tr class="separator:a91789d9f59d876e82b24c92605a56bdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34d83a6ed93f0e1831850ca1cee9a663"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a34d83a6ed93f0e1831850ca1cee9a663">Quaternion</a> (const <a class="el" href="class_t3_d_1_1_matrix3x3.html">Matrix3x3</a> &amp;m)</td></tr>
<tr class="separator:a34d83a6ed93f0e1831850ca1cee9a663"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ac79860a274ec8f8fe42a767e27fc9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ac79860a274ec8f8fe42a767e27fc9c"></a>
<a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a2ac79860a274ec8f8fe42a767e27fc9c">operator=</a> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr class="memdesc:a2ac79860a274ec8f8fe42a767e27fc9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">basic operations <br/></td></tr>
<tr class="separator:a2ac79860a274ec8f8fe42a767e27fc9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a439482cb1423aad04fad5204f67aed34"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a439482cb1423aad04fad5204f67aed34"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator+</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q) const </td></tr>
<tr class="separator:a439482cb1423aad04fad5204f67aed34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d9189de67076c8a01c875989ab0bc76"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d9189de67076c8a01c875989ab0bc76"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q) const </td></tr>
<tr class="separator:a0d9189de67076c8a01c875989ab0bc76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5322880c2542555b0bafa79e0d14a46"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac5322880c2542555b0bafa79e0d14a46"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q) const </td></tr>
<tr class="separator:ac5322880c2542555b0bafa79e0d14a46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa772f8cf6670e098f696dafdebfa88ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa772f8cf6670e098f696dafdebfa88ca"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator/</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q) const </td></tr>
<tr class="separator:aa772f8cf6670e098f696dafdebfa88ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5804bcea4e588d03ee49fe3137c66db"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5804bcea4e588d03ee49fe3137c66db"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator*</b> (float scale) const </td></tr>
<tr class="separator:ad5804bcea4e588d03ee49fe3137c66db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad47696bac242d2874d3769eda5388e8b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad47696bac242d2874d3769eda5388e8b"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator/</b> (float scale) const </td></tr>
<tr class="separator:ad47696bac242d2874d3769eda5388e8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a936a66da8db92d0bda5e4f773657b477"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a936a66da8db92d0bda5e4f773657b477"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator-</b> () const </td></tr>
<tr class="separator:a936a66da8db92d0bda5e4f773657b477"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa183a01f6cdd087caa1db55b2e5d8a11"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa183a01f6cdd087caa1db55b2e5d8a11"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator+=</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr class="separator:aa183a01f6cdd087caa1db55b2e5d8a11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7c4508e943365118e3ce819f69cb8b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7c4508e943365118e3ce819f69cb8b0"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator-=</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr class="separator:ab7c4508e943365118e3ce819f69cb8b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d1f3faf741a3055d4dd3965271ed261"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8d1f3faf741a3055d4dd3965271ed261"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator*=</b> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr class="separator:a8d1f3faf741a3055d4dd3965271ed261"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3389b833dca40827f6de76f488e66dd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3389b833dca40827f6de76f488e66dd9"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator*=</b> (float scale)</td></tr>
<tr class="separator:a3389b833dca40827f6de76f488e66dd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3e8351a4f8c142193c94cfc56244bb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e3e8351a4f8c142193c94cfc56244bb"></a>
const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator/=</b> (float scale)</td></tr>
<tr class="separator:a2e3e8351a4f8c142193c94cfc56244bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1900cc9df98213dd4b5df574a5fd8887"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a1900cc9df98213dd4b5df574a5fd8887">length</a> () const </td></tr>
<tr class="separator:a1900cc9df98213dd4b5df574a5fd8887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a4ab822e725b00342ae07b7079bf6b3"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a8a4ab822e725b00342ae07b7079bf6b3">squaredLength</a> () const </td></tr>
<tr class="separator:a8a4ab822e725b00342ae07b7079bf6b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e076399228a48deb6f469483978dfec"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e076399228a48deb6f469483978dfec"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a2e076399228a48deb6f469483978dfec">normalise</a> ()</td></tr>
<tr class="memdesc:a2e076399228a48deb6f469483978dfec"><td class="mdescLeft">&#160;</td><td class="mdescRight">normalizes this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> <br/></td></tr>
<tr class="separator:a2e076399228a48deb6f469483978dfec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5488299b2ad47fdb67b20fe46b65666"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#ab5488299b2ad47fdb67b20fe46b65666">normalised</a> () const </td></tr>
<tr class="separator:ab5488299b2ad47fdb67b20fe46b65666"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa22423bdf63803cff2071f3f4d0fc589"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa22423bdf63803cff2071f3f4d0fc589"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#aa22423bdf63803cff2071f3f4d0fc589">conjugate</a> ()</td></tr>
<tr class="memdesc:aa22423bdf63803cff2071f3f4d0fc589"><td class="mdescLeft">&#160;</td><td class="mdescRight">computes the conjugate of this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> <br/></td></tr>
<tr class="separator:aa22423bdf63803cff2071f3f4d0fc589"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fd7bf3a7e3e6f03b4f867a98038634a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fd7bf3a7e3e6f03b4f867a98038634a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a1fd7bf3a7e3e6f03b4f867a98038634a">invert</a> ()</td></tr>
<tr class="memdesc:a1fd7bf3a7e3e6f03b4f867a98038634a"><td class="mdescLeft">&#160;</td><td class="mdescRight">inverts this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> <br/></td></tr>
<tr class="separator:a1fd7bf3a7e3e6f03b4f867a98038634a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15193f0c7b6344c850355fcd252010bd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a15193f0c7b6344c850355fcd252010bd">log</a> () const </td></tr>
<tr class="separator:a15193f0c7b6344c850355fcd252010bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61eaf3b0493547b96702789d214c62be"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a61eaf3b0493547b96702789d214c62be">exp</a> () const </td></tr>
<tr class="separator:a61eaf3b0493547b96702789d214c62be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19aabb06f5f967b1ca2391bb917a3a3d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a19aabb06f5f967b1ca2391bb917a3a3d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a19aabb06f5f967b1ca2391bb917a3a3d">operator Matrix4x4</a> () const </td></tr>
<tr class="memdesc:a19aabb06f5f967b1ca2391bb917a3a3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">casting to a 4x4 isomorphic matrix for right multiplication with vector <br/></td></tr>
<tr class="separator:a19aabb06f5f967b1ca2391bb917a3a3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a86bc98c962c5cee6984eb5c131bfe3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a86bc98c962c5cee6984eb5c131bfe3"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a7a86bc98c962c5cee6984eb5c131bfe3">operator Matrix3x3</a> ()</td></tr>
<tr class="memdesc:a7a86bc98c962c5cee6984eb5c131bfe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">casting to 3x3 rotation matrix <br/></td></tr>
<tr class="separator:a7a86bc98c962c5cee6984eb5c131bfe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a41fcf96f67e9c89f0d2800e05a936c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a9a41fcf96f67e9c89f0d2800e05a936c">toAngleAxis</a> (float &amp;angle, <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;axis)</td></tr>
<tr class="separator:a9a41fcf96f67e9c89f0d2800e05a936c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5901e1f6605a90d37ad3dc20babf3958"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5901e1f6605a90d37ad3dc20babf3958"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a5901e1f6605a90d37ad3dc20babf3958">rotate</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;<a class="el" href="class_t3_d_1_1_quaternion.html#a519e11430740c46525537c626e2002ce">v</a>)</td></tr>
<tr class="memdesc:a5901e1f6605a90d37ad3dc20babf3958"><td class="mdescLeft">&#160;</td><td class="mdescRight">rotates v by this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> (<a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> must be unit) <br/></td></tr>
<tr class="separator:a5901e1f6605a90d37ad3dc20babf3958"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeca5d04f00eae931e1b35a6c3c8e1f35"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#aeca5d04f00eae931e1b35a6c3c8e1f35">eulerAngles</a> () const </td></tr>
<tr class="separator:aeca5d04f00eae931e1b35a6c3c8e1f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac5132ebdc6f63be990ac30626ea84edb"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#ac5132ebdc6f63be990ac30626ea84edb">dot</a> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q1, const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q2)</td></tr>
<tr class="separator:ac5132ebdc6f63be990ac30626ea84edb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027156cbbcbace6bf41525d9e7f34350"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a027156cbbcbace6bf41525d9e7f34350">lerp</a> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q1, const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q2, float t)</td></tr>
<tr class="separator:a027156cbbcbace6bf41525d9e7f34350"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad73ecf570146978e1811f60fa63374b3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#ad73ecf570146978e1811f60fa63374b3">slerp</a> (const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q1, const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q2, float t)</td></tr>
<tr class="separator:ad73ecf570146978e1811f60fa63374b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb8195aec8da40cb3f71f0f8eb67a2b3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#afb8195aec8da40cb3f71f0f8eb67a2b3">fromAngleAxis</a> (float angle, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;axis)</td></tr>
<tr class="separator:afb8195aec8da40cb3f71f0f8eb67a2b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a2227b4ebadd8e852a79fe41f0eeaf5f8"><td class="memItemLeft" ><a class="anchor" id="a2227b4ebadd8e852a79fe41f0eeaf5f8"></a>
union {</td></tr>
<tr class="memitem:aa2f80c4d83938e74ce5ea418075e8c84"><td class="memItemLeft" ><a class="anchor" id="aa2f80c4d83938e74ce5ea418075e8c84"></a>
&#160;&#160;&#160;struct {</td></tr>
<tr class="memitem:a174da4d4470988320ac3dabab0edbbe5"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<a class="el" href="class_t3_d_1_1_quaternion.html#a5cca6c63059d5dc4206092fabdf67740">s</a></td></tr>
<tr class="memdesc:a174da4d4470988320ac3dabab0edbbe5"><td class="mdescLeft">&#160;</td><td class="mdescRight">the real component <br/></td></tr>
<tr class="separator:a174da4d4470988320ac3dabab0edbbe5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0de1a668995aa1ee2d8b7a6a02a797f2"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;&#160;&#160;<a class="el" href="class_t3_d_1_1_quaternion.html#a519e11430740c46525537c626e2002ce">v</a></td></tr>
<tr class="memdesc:a0de1a668995aa1ee2d8b7a6a02a797f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">the imaginary components <br/></td></tr>
<tr class="separator:a0de1a668995aa1ee2d8b7a6a02a797f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2f80c4d83938e74ce5ea418075e8c84"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
<tr class="separator:aa2f80c4d83938e74ce5ea418075e8c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f2eb5153900ca855b9e0e4267e30d40"><td class="memItemLeft" ><a class="anchor" id="a5f2eb5153900ca855b9e0e4267e30d40"></a>
&#160;&#160;&#160;struct {</td></tr>
<tr class="memitem:a665c76eac2183a4b4d1548ea26ef5226"><td class="memItemLeft" >&#160;&#160;&#160;&#160;&#160;&#160;float&#160;&#160;&#160;<b>elem</b> [4]</td></tr>
<tr class="separator:a665c76eac2183a4b4d1548ea26ef5226"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f2eb5153900ca855b9e0e4267e30d40"><td class="memItemLeft" valign="top">&#160;&#160;&#160;}&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
<tr class="separator:a5f2eb5153900ca855b9e0e4267e30d40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2227b4ebadd8e852a79fe41f0eeaf5f8"><td class="memItemLeft" valign="top">};&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
<tr class="separator:a2227b4ebadd8e852a79fe41f0eeaf5f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a60829c0f8f2a36602ab5fdbb1a79b635"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60829c0f8f2a36602ab5fdbb1a79b635"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_quaternion.html#a60829c0f8f2a36602ab5fdbb1a79b635">operator&lt;&lt;</a> (std::ostream &amp;o, const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;q)</td></tr>
<tr class="memdesc:a60829c0f8f2a36602ab5fdbb1a79b635"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function for writing to a stream. <br/></td></tr>
<tr class="separator:a60829c0f8f2a36602ab5fdbb1a79b635"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A quaternion class adapted from <a href="http://willperone.net/Code/Quaternion.php">http://willperone.net/Code/Quaternion.php</a>. </p>
<p>More information about Quaternions and the theory behind them can be found here:</p>
<ul>
<li><a href="http://www.ogre3d.org/tikiwiki/Quaternion+and+Rotation+Primer">http://www.ogre3d.org/tikiwiki/Quaternion+and+Rotation+Primer</a></li>
<li><a href="http://www.cprogramming.com/tutorial/3d/quaternions.html">http://www.cprogramming.com/tutorial/3d/quaternions.html</a></li>
<li><a href="http://www.gamedev.net/page/resources/_/reference/programming/math-and-physics/quaternions/Quaternion-powers-r1095">http://www.gamedev.net/page/resources/_/reference/programming/math-and-physics/quaternions/Quaternion-powers-r1095</a> <dl class="section author"><dt>Author</dt><dd>Robert Ollington </dd></dl>
</li>
</ul>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a019944a146d7d35841d6a567abed5f49"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Quaternion::Quaternion </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Default <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> constructor </p>

</div>
</div>
<a class="anchor" id="ad5abd09be466be4b0ac66e6d1eb953bb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Quaternion::Quaternion </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>real</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> from real and imaginary parts </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">real</td><td>the real part </td></tr>
    <tr><td class="paramname">x</td><td>the imaginary x coord </td></tr>
    <tr><td class="paramname">y</td><td>the imaginary y coord </td></tr>
    <tr><td class="paramname">z</td><td>the imaginary z coord </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7286f9b4e59fee5c8020958b4e0e3035"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Quaternion::Quaternion </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>real</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>i</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> from real and imaginary parts </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">real</td><td>the real part </td></tr>
    <tr><td class="paramname">i</td><td>the imaginary part </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a137438607cb89c9d9bace3bbf81047f6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Quaternion::Quaternion </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>theta_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>theta_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>theta_z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> from Euler angles </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">theta_x</td><td>rotation around x axis (pitch) </td></tr>
    <tr><td class="paramname">theta_y</td><td>rotation around y axis (yaw) </td></tr>
    <tr><td class="paramname">theta_z</td><td>rotation around z axis (roll) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a91789d9f59d876e82b24c92605a56bdb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Quaternion::Quaternion </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>angles</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> from Euler angles </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angles</td><td>rotation around x, y and z axes (pitch, yaw, roll) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a34d83a6ed93f0e1831850ca1cee9a663"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Quaternion::Quaternion </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_matrix3x3.html">Matrix3x3</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> from a rotation matrix </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>the rotation matrix </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac5132ebdc6f63be990ac30626ea84edb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static float T3D::Quaternion::dot </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"><em>q2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>computes the dot product of 2 quaternions </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">q1</td><td>the first quaternion </td></tr>
    <tr><td class="paramname">q2</td><td>the second quaternion </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the dot product </dd></dl>

</div>
</div>
<a class="anchor" id="aeca5d04f00eae931e1b35a6c3c8e1f35"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> T3D::Quaternion::eulerAngles </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>gets the euler angles from a rotation <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </p>
<dl class="section return"><dt>Returns</dt><dd>the rotation around the x,y and z axes (pitch, yaw, roll) </dd></dl>

</div>
</div>
<a class="anchor" id="a61eaf3b0493547b96702789d214c62be"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> T3D::Quaternion::exp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>returns e^Quaternion = exp(v*a) = [cos(a),vsin(a)] </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000008">Todo:</a></b></dt><dd>this method needs to be checked for correctness </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>the new <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </dd></dl>

</div>
</div>
<a class="anchor" id="afb8195aec8da40cb3f71f0f8eb67a2b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> T3D::Quaternion::fromAngleAxis </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>axis</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>converts from a normalized axis - angle pair rotation to a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </p>
<dl class="section remark"><dt>Remarks</dt><dd>note that we can't make this a constructor because it would clash </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">angle</td><td>the angle of rotation around the axis </td></tr>
    <tr><td class="paramname">axis</td><td>the axis of rotation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1900cc9df98213dd4b5df574a5fd8887"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Quaternion::length </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>gets the length of this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </p>
<dl class="section return"><dt>Returns</dt><dd>the length </dd></dl>

</div>
</div>
<a class="anchor" id="a027156cbbcbace6bf41525d9e7f34350"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> T3D::Quaternion::lerp </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"><em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>calculates a linear interpolation between 2 quaternions </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">q1</td><td>the first quaternion </td></tr>
    <tr><td class="paramname">q2</td><td>the second quaternion </td></tr>
    <tr><td class="paramname">t</td><td>the interpolatin parameter. range: 0(q1)..1(q2) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the interpolated quaternion </dd></dl>

</div>
</div>
<a class="anchor" id="a15193f0c7b6344c850355fcd252010bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> T3D::Quaternion::log </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>returns the logarithm of a <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> = v*a where q = [cos(a),v*sin(a)] </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000007">Todo:</a></b></dt><dd>this method needs to be checked for correctness </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>the new <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ab5488299b2ad47fdb67b20fe46b65666"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> T3D::Quaternion::normalised </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>gets a normalized version of this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </p>
<dl class="section return"><dt>Returns</dt><dd>the new normalized <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ad73ecf570146978e1811f60fa63374b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> T3D::Quaternion::slerp </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_quaternion.html">Quaternion</a> &amp;&#160;</td>
          <td class="paramname"><em>q2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>calculates a spherical interpolation between 2 quaternions slerp is slower than lerp, but may produce a better looking result probably best not to use this for small angles </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">q1</td><td>the first quaternion </td></tr>
    <tr><td class="paramname">q2</td><td>the second quaternion </td></tr>
    <tr><td class="paramname">t</td><td>the interpolatin parameter. range: 0(q1)..1(q2) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the interpolated quaternion </dd></dl>

</div>
</div>
<a class="anchor" id="a8a4ab822e725b00342ae07b7079bf6b3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Quaternion::squaredLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>gets the squared length of this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </p>
<dl class="section remark"><dt>Remarks</dt><dd>Note that this is faster than the <a class="el" href="class_t3_d_1_1_quaternion.html#a1900cc9df98213dd4b5df574a5fd8887">length()</a> method </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>the squared length </dd></dl>

</div>
</div>
<a class="anchor" id="a9a41fcf96f67e9c89f0d2800e05a936c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void T3D::Quaternion::toAngleAxis </td>
          <td>(</td>
          <td class="paramtype">float &amp;&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>axis</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>computes the angle and axis of rotation for this <a class="el" href="class_t3_d_1_1_quaternion.html" title="A quaternion class adapted from http://willperone.net/Code/Quaternion.php. ">Quaternion</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">angle</td><td>the angle of rotation around the axis </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">axis</td><td>the axis of rotation </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>M:/T3Dwin/T3DShaderVersion/T3D/T3D/<a class="el" href="_quaternion_8h_source.html">Quaternion.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 27 2014 10:39:52 for T3D by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
